// Knock knock in the test dimension
// If a player stays in the eou:test dimension for more than 15 minutes (18000 ticks), they will be kill
let playerTicks = {};

ServerEvents.tick(event => {
    event.server.players.forEach(player => {
        if (player.level.dimension === 'eou:test') {
            const id = player.uuid;
            playerTicks[id] = (playerTicks[id] || 0) + 1;
            if (playerTicks[id] >= 18000) {
                player.kill();
                playerTicks[id] = 0;
            }
        } else {
            playerTicks[player.uuid] = 0;
        }
    });
});